package com.wcx.application.service.Impl;

import com.wcx.application.domian.AdminBean;
import com.wcx.application.domian.StudentBean;
import com.wcx.application.mapper.AdminMapper;
import com.wcx.application.mapper.StudentMapper;
import com.wcx.application.service.AdminService;
import com.wcx.application.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    StudentMapper studentMapper;

    @Override
    public List<StudentBean> getList() {
        return studentMapper.getList();
    }

    @Override
    public int update(StudentBean studentBean) {
        return studentMapper.update(studentBean);
    }

    @Override
    public int delete(int id) {
        return studentMapper.delete(id);
    }

    @Override
    public int updateAvatarById(String originalFilename, int id) {
        return studentMapper.updateAvatarById(originalFilename,id);
    }

    @Override
    public int create(StudentBean studentBean) {
        return studentMapper.create(studentBean);
    }

    @Override
    public List<StudentBean> searchList(StudentBean studentBean) {
        return studentMapper.searchList(studentBean);
    }

    @Override
    public int updateAvatarByUserName(String originalFilename, String username) {
        return studentMapper.updateAvatarByUserName(originalFilename,username);
    }

    @Override
    public StudentBean login(StudentBean studentBean) {
        return studentMapper.login(studentBean);
    }

    @Override
    public int search(String username) {
        return studentMapper.search(username);
    }


}
